--------------
TryMe_Dutch.MM
--------------

This example shows how the TryMe example is adapted to the Dutch language. It should just as easily be adapted for any other language, apart of course from the effort of translating all the texts in the installer. For the Dutch language the translated texts are part of this package: all *.NLD files. So if you want to adapt your own MSI to the Dutch language, simply copy the NLD files and put the relevant lines from the TryMe_Dutch files in your own script files. For other languages, you need to do more, which is described below.


Files part of the package
-------------------------
 - all files from the TryMe.MM example; renamed when changes have been made for the language.
 - ME_Dutch.MMH: a copy of ME.MMH from the MakeMSI folder, with translations.
 - *.NLD: all translated texts for the MSI user interface. (see section "IDT files")


IDT files
---------
A description of the format of these files you can find in the MakeMSI manual (\Windows Installer Basics\.idt (text representation of database tables) ).
Suffice it to say here that they are tab-separated files, and when editing it is essential to keep all tabs as they are.
I am using the extension .NLD for .IDT files with my translated Dutch texts, following the example of the Microsoft Platform SDK.

ActionTe.NLD and Error.NLD are copied straight from the Microsoft Platform SDK for Windows XP, like the MakeMSI manual suggests (\Windows Installer Basics\Internationalization). The other NLD files I have stripped and translated myself. 
In case the MS Platform SDK doesn't offer these two in your language, you need to make them yourself in the same way as described below for the other IDT files.


IDT FILES - CREATING YOUR OWN
-----------------------------
I have created the NLD files using the following:
- first create an MSI file in the normal, English, language.
- open that MSI file with Orca (right click on it and select view with Orca),
  and select 'Export Tables' from the Tables menu.
  Select the following Tables: Control, Dialog, Property, RadioButton and UIText.
- now you should have 5 .idt files in the same folder as the MSI.
- rename the idt files to an extension mirroring your language, 
  and move them to your main script folder (or any other place you want to import them from.)
- strip the unnecessary lines from the files (see below)
- translate the right columns of all remaining lines. 

You can use a normal text editor to do the translations, as long as it leaves the tabs intact, and can handle whatever special characters your language requires. This makes it harder to find the right columns in Control.idt though. Alternatively you could use a spreadsheet like Excel, and save the result as tab delimited text file. 
Another option is to edit the MSI in Orca, do the translations there, only then save the tables and finally strip the result. The advantage is that you can immediately test if the result matches your expectation, but editing longer lines and adding special characters is not ideal within Orca.


IDT FILES - STRIPPING
---------------------
Once you have your translated and stripped files, they are imported with the TableImportFromIdt command, using the DIRECT="N" option. This imports your files line by line, overwriting only the rows necessary. Using the Direct way, the table would be deleted and replaced with the contents of the IDT file. 
There are two reasons not to do that:
- you get errors when importing CONTROL.IDT without stripping it, because some code of MakeMSI expects the table rows it adds not to exist previously.
- you overwrite settings from your script files. For example: _MAKEMSI_BuildTime in Property.IDT should always contain the build date of your current MSI.

So what you need to do is remove all lines from the IDT files that do not contain text that needs to be translated. UIText and RadioButton can stay as they are, but Property, Dialog and Control need to be stripped. The .NLD files can be used as an example which can be removed and which should stay. Note though that I created those by trial and error, so they might not be flawless.
There are a few things to watch when stripping:
- keep all tabs intact!
- leave the first 3 lines as they are.
- make sure you only translate the texts in the correct column(s). This is obvious for most IDT files, but not for Control.idt, where only the Text and the Help column need translation, and Dialog.idt, where 2 dialog titles have text.
- In Property.idt the ProductLanguage should also be specified. (see below)
- texts that are set by your own files should be removed too, like the texts in your .VER file and in your version of ME.MMH.
- in Dialog.idt and Control.idt, the lines about LicenseAgreementDlg should be removed if you have the licence turned off, or you'll get errors.


Language ID's
-------------
You are supposed to specify the language of the MSI. I do that in Property.NLD, but perhaps there are other options. (It might be nice if there was a field in the .VER file to specify it, but that is currently not supported.)
Now the problem is how to determine the right number for your language. And actually, I haven't been able to find an answer for that. But searching the internet for Language Identifiers, I finally found a list somewhere that contains a fair amount of IDs, so I've added them to this package: LanguageIdentifiers.txt.

In TryMe_Dutch.MM I also set the CodePage. In my case I set it to the standard West European Latin, but if you need different characters, you can change it. Luckily the numbers for the right codepages are easier to find, see for example: http://en.wikipedia.org/wiki/Codepage.


Unresolved Issues
-----------------
There is one place where I haven't managed to translate: in Control.idt - VerifyReadyDlg - Description: contains [InstallMode] which stays English. This is displayed in the last dialog before you press 'Install', on the second line from the top.
As far as I can tell, this is set when the user selects which install he prefers, be it complete, typical or custom. The property InstallMode is found in Property.idt, and it gets it's value from the Argument in: ControlEvent.idt - SetupTypeDlg/MaintainanceDlg - TypicalButton/CompleteButton/CustomButton - [InstallMode]. When you change these values, the VerifyReady dialog looks good, but some 'back' buttons don't function anymore, since in ControlEvent.idt they have conditions that do a string comparison on InstallMode. (Other possible values of InstallMode are 'Change', 'Remove', 'Repair' and 'Server Image'.) A test with a stripped and translated ControlEvent.NLD didn't quite seem to work, since apparently after that import the English terms were re-inserted in the table, giving unwanted results.
